package com.sinsz.c.exception;

/**
 * 异常器
 * @author chenjianbo
 */
public class SystemException extends RuntimeException {

    private IError error;

    public SystemException(IError error) {
        super(error.getCode() + ":" + error.getMessage());
        this.error = error;
    }

    public IError getError() {
        return error;
    }

    public void setError(IError error) {
        this.error = error;
    }

    @Override
    public String toString() {
        return error.getCode() + ":" + error.getMessage();
    }

}